package com.example.hanfu_bk.service;

import com.example.hanfu_bk.mapper.StyleMapper;
import com.example.hanfu_bk.pojo.Style;
import com.example.hanfu_bk.mapper.StyleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StyleService {

    @Autowired
    private StyleMapper styleMapper;


    public List<Style> searchAll() {
        return styleMapper.searchAll();
    }

    public List<Style> searchCate(String name, Integer typeId) {
        return styleMapper.searchCate(name,typeId);
    }

    public List<Style> searchCateByName(String name) {
        return styleMapper.searchCateByName(name);
    }

    public List<Style> searchCateByType(Integer typeId) {
        return styleMapper.searchCateByType(typeId);
    }

    public void deleteCate(Integer id) {
        styleMapper.deleteCate(id);
    }

    public void addCate(Style style) {
        styleMapper.addCate(style);
    }

    public void updateCate(Style style) {
        styleMapper.updateCate(style);
    }

}
